function fig3_30

clf

nx=200;
x=linspace(-10,30,nx);

clf
% get(gcf)
set(gcf,'Position', [25 1115 658 230])
co = [0 0 1;
    0 0.5 0;
    1 0 0;
    0 0.75 0.75;
    0.75 0 0.75;
    0.75 0.75 0;
    0.25 0.25 0.25];
set(groot,'defaultAxesColorOrder',co)
subaxis(1,1,1,1,'MT',0.01,'MB',0.18,'MR',-0.02,'ML',0.05,'P',0.04)

icase=2

if icase==1
    ep=1;
else
    ep=0.1;
end

t=1;
for ix=1:nx
    s1 = erfc( 0.5*(x(ix)-t)/sqrt(ep*t) );
    s2 = erfc( -0.5*x(ix)/sqrt(ep*t) );
    k = s1*exp(- 0.5*(x(ix)-0.5*t)/ep )/s2;
    u1(ix) = k/(1+k);
    xb = (x(ix)-0.5*t)/ep;
    ua1(ix) = exp(-0.5*xb)/(1+exp(-0.5*xb));
end

t=15;
for ix=1:nx
    s1 = erfc( 0.5*(x(ix)-t)/sqrt(ep*t) );
    s2 = erfc( -0.5*x(ix)/sqrt(ep*t) );
    k = s1*exp(- 0.5*(x(ix)-0.5*t)/ep )/s2;
    u2(ix) = k/(1+k);
    xb = (x(ix)-0.5*t)/ep;
    ua2(ix) = exp(-0.5*xb)/(1+exp(-0.5*xb));
end

t=30;
for ix=1:nx
    s1 = erfc( 0.5*(x(ix)-t)/sqrt(ep*t) );
    s2 = erfc( -0.5*x(ix)/sqrt(ep*t) );
    k = s1*exp(- 0.5*(x(ix)-0.5*t)/ep )/s2;
    u3(ix) = k/(1+k);
    xb = (x(ix)-0.5*t)/ep;
    ua3(ix) = exp(-0.5*xb)/(1+exp(-0.5*xb));
end

plot(x,ua1,'r','Linewidth',1.1)
hold on
plot(x,u1,'--b','Linewidth',1.5)

plot(x,ua2,'r','Linewidth',1.1)
plot(x,u2,'--b','Linewidth',1.5)

plot(x,ua3,'r','Linewidth',1.1)
plot(x,u3,'--b','Linewidth',1.5)

if icase==1
    %  ep=1
    text(-5,0.7,'$t = 1$','Interpreter','latex','FontSize',13)
    text(2.5,0.6,'$t = 15$','Interpreter','latex','FontSize',13)
    text(11,0.5,'$t = 30$','Interpreter','latex','FontSize',13)
    say=['$\varepsilon =\,\,$',num2str(ep)];
    text(25.5,0.84,say,'FontSize',13,'FontWeight','bold','Interpreter','latex')
else
    %  ep=0.1
    text(-2.9,0.7,'$t = 1$','Interpreter','latex','FontSize',13)
    text(3.6,0.6,'$t = 15$','Interpreter','latex','FontSize',13)
    text(11.2,0.5,'$t = 30$','Interpreter','latex','FontSize',13)
    say=['$\varepsilon =\,\,$',num2str(ep)];
    text(25.5,0.84,say,'FontSize',13,'FontWeight','bold','Interpreter','latex')
end

box on
grid on
axis([-10 30 -0.05 1.05])
set(gca,'ytick',[0 1])

ax = gca;
ax.XAxis.TickLabelInterpreter = 'latex';
ax.YAxis.TickLabelInterpreter = 'latex';
set(gca,'FontSize',13)

xlabel('$x$\,-\,axis','Interpreter','latex','FontSize',14)
ylabel('Solution','Interpreter','latex','FontSize',14)

legend(' Asymptotic\,\,',' Exact','Location','East','FontSize',13,'Interpreter','latex')

% if icase==1
%     exportgraphics(gcf,'/Users/mark/Desktop/fig222a.pdf')
% else
%     exportgraphics(gcf,'/Users/mark/Desktop/fig222b.pdf')
% end




